DHTML JavaScript Tree samples

Drag-n-drop into tree

Some text

 

 

 

 

 

. <div id="a0">Some text</div> <div id="a1" text="Tomb" image="tombs.gif">Some complex HTML</div> ... <script> tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0); ... tree.makeDragable("a0"); tree.makeDragable("a1"); </script>

. <div id="a2" text="Green" ><div style='width:50px; height:20px; background-color:green;'>&nbsp;</div></div><br/> ... <script> tree.makeDragable("a2",function(drop_obj,source_id,target_on,target_before){ drop_obj.insertNewItem(target_on,source_id,"Green 1"); drop_obj.insertNewItem(target_on,source_id,"Green 2"); drop_obj.insertNewItem(target_on,source_id,"Green 3"); }); </script>

. <div dragInDhtmlXTree="true" id="a3" text="Blue" >...</div> <div dragInDhtmlXTree="true" id="a4" image="open2.gif" text="Open">...</div> <div dragInDhtmlXTree="true" id="a5" image="tombs.gif" text="Tomb">...</div> ... <script> tree.makeAllDraggable(); </script>



Go to the dhtmlxTree main page or Close this page